<template>
  <!--猎头列表-->
  <div class="content">
          <el-table :data="hrList" style="width: 100%">
      <el-table-column prop="name" label="账户名" width="180">
      </el-table-column>
      <el-table-column prop="company_name" label="公司" width="180">
      </el-table-column>
      <el-table-column prop="contact_person" label="联系人">
      </el-table-column>
      <el-table-column prop="contact_phone" label="联系电话">
      </el-table-column>
      <el-table-column prop="contact_mobile_phone" label="联系手机">
      </el-table-column>
      <el-table-column prop="contact_email"   label="联系邮箱">
      </el-table-column>
      <el-table-column prop="create_time" sortable label="加入时间">
      </el-table-column>

      <el-table-column label="操作" width="100">
        <template scope="scope">
          <el-button @click="goHrDetail(scope.$index)" type="text" size="small">查看详情</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import { fetchHrList } from 'api/remoteSearch'
export default {
  data(){
    return{
      hrList:[]
    }
  },
  mounted(){
    this.fechHrListData();
  },
  methods:{
    goHrDetail(index){
      console.log(index)
      let id=this.hrList[index].id;
      this.$router.push({path:`/hr/${id}/focus`})
    },
    fechHrListData(){
      let vm=this;
      fetchHrList()
      .then(res=>{
        if(res.data.status=='success'){
          vm.hrList=res.data.hr_list;
        }
      })
      .catch(err=>{

      })
    }
  }
}
</script>

<style>
  
</style>
